//
//  DrillResultCell.m
//  DefendHealth
//
//  Created by 吾诺瀚卓 on 17/2/22.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "DrillResultCell.h"
#import "Header.h"

@implementation DrillResultCell

- (void)awakeFromNib {
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        UILabel * title = [ReduceCode creatLabelWithFrame:CGRectMake(10, 25, 100, 14) title:@"训练结果" titleColor:UIColorFromRGB(0x473d3b) font:14 textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:title];
        title.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];

        UIButton * moreBtn = [UIButton creatBtnWithFrame:CGRectMake(kScreenWidth-54, 0, 50, 30) btnTitle:@"更多" btnTitleColor:UIColorFromRGB(0x333333) btnTitleFont:14 btnTagPrice:0 btnSetImage:IMAGE(@"point") btnBackgroundColor:nil isCorner:NO action:^(UIButton *button) {
            
        }];
        moreBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];

        [moreBtn layoutButtonWithEdgeInsetsStyle:MKButtonEdgeInsetsStyleRight imageTitleSpace:5];
        moreBtn.centerY = title.centerY;

        [self.contentView addSubview:moreBtn];

        UIImageView * mainImg = [[UIImageView alloc]initWithFrame:CGRectMake(10, kMaxY(title.frame)+15, 90, 90)];
        mainImg.backgroundColor=UIColorFromRGB(0xcccaca);
        [self.contentView addSubview:mainImg];
        
        UILabel * contentLab = [ReduceCode creatLabelWithFrame:CGRectMake(kMaxX(mainImg.frame)+10, mainImg.frame.origin.y, kScreenWidth-mainImg.width-10-10, mainImg.height) title:@"这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容这里是内容" titleColor:UIColorFromRGB(0x969797) font:10 textAlignment:NSTextAlignmentLeft];
        contentLab.numberOfLines=0;
        [contentLab sizeToFit];
        [self.contentView addSubview:contentLab];
        
    }
    
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
